﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Web;
using SiteServer.Plugin;

namespace Thingpower.SS.OSS.Provider
{
    public class BaseDAO
    {
        protected DatabaseType DatabaseType => OSSPlugin.Instance.DatabaseType;
        protected static string ConnectionString => OSSPlugin.Instance.ConnectionString;
        protected static IDatabaseApi DataApi => OSSPlugin.Instance.DatabaseApi;

        public static int GetCount(string sqlString)
        {
            return int.Parse(DataApi.ExecuteScalar(ConnectionString, sqlString).ToString());

        }
    }
}